//1.导入Vue和Vuex
import Vue from 'vue'
import Vuex from 'vuex'

import shopCart from '@/store/modules/shopCart.js'
import selectedGoodsList from '@/store/modules/selectedGoodsList.js'
import address from '@/store/modules/address.js'
import addressList from '@/store/modules/addressList.js'
import orderList from '@/store/modules/orderList.js'

//2.将 Vuex 安装为 Vue 的插件
Vue.use(Vuex)
// 3.创建 Store 的实例对象
const store = new Vuex.Store({
    // 挂载 store 模块
	modules: {
		shopCart,
		selectedGoodsList,
		address,
		addressList,
		orderList
	}
})
// 4.向外共享 Store 的实例对象
export default store